<%@page contentType="text/html;charset=UTF-8"%>
<jsp:useBean id="p" scope="page" class="net.ibizsys.paas.web.VCPage" />
<% if(!p.init(pageContext,"/App/Card/GG_CARDFullSearchView.do")){return;}%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="ibiz5" uri="http://www.ibizsys.cn/tags"%>
<c:set var="web" value="${pageContext.request.contextPath}" />
<c:set var="ctx" value="${pageContext.request.contextPath}/app" />
<c:set var="ctx2" value="${pageContext.request.contextPath}/App" />
<% String strEmbed = (p.isEmbed()?"true":"");String strCId=p.getCId();String strIFChild=(p.isIFChild()?"true":"false");String strLocale=p.getLocalization().toLowerCase();%>
<c:set var="cid" value="${strCId}" />
<c:set var="locale" value="${strLocale}" />
 
<!DOCTYPE html>
<html lang="zh-CN">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<head>
<%@include file="../../lib/lib-common-style.jsp"%>
<%@include file="../../lib/lib-user-style.jsp"%>
<%@include file="../../lib/decustomviewlib-style.jsp"%>
 
<%@include file="../../lib/lib-common-script.jsp"%>
<%@include file="../../lib/lib-user-script.jsp"%>
<%@include file="../../lib/decustomviewlib-script.jsp"%>
<script src='${ctx}/js/Card/GG_CARDFullSearchViewControllerBase.js?v=1997_20180426095343' type='text/javascript'></script>
<script src='${ctx}/js/Card/GG_CARDFullSearchViewController.js?v=1997_20180426095343' type='text/javascript'></script>
<style>
html,body{ 
margin:0px; 
height:100%; 
} 
.jstree-default .jstree-clicked {
  border: 0;
  background-color: #ffffff;
  box-shadow: none;
}
.checkbox-list > label.checkbox-inline:first-child {
  padding-left: 20px;
}
.checkbox-inline + .checkbox-inline {
  margin-top: 0;
  margin-left: 0px;
}
.tab-pane-butoon{
	width: 210px;
    margin: auto;
}
.button-a{
	margin-left:6px;
}
</style>
</head>
<body style="background-color:white"  class="ibiz-body-fill">
					<div class="ibiz-layout ibiz-layout--body ibiz-fill">
					
						<div  data-ibiz-layout="region:'north',height:'60'" style="width:100%">
					 			<div class="input-group input-medium pull-left" style="padding-top:20px;padding-left:12px"> 
					 				<input class="form-control" id="checked" type="text" style="height:30px;width:300px;margin-left: 8px" >
					 				<span   style="margin-left:-7px">
						 				<button id="btn1" class="btn green" style="height:30px;width:40px;" type="submit" onclick="search()"><i class="fa fa-search"></i></button>
									</span>
									 
									<span id="indexMake" class="input-group-btn" style="padding-right:8px;">
										<button id="btn3" class="input-group-btn" style="color: #ffffff;background-color: #ffffff;width: 30px;border: none" type="submit" onclick="exportData2()"><i class="fa fa-search" style="color: #FFFFFF"></i></button>
									</span>
								 </div>
				 	 	</div>
				 	 	
				 	 	<div    class="ibiz-layout"  data-ibiz-layout="region:'center',height:'auto'" style=" " > 
						 
							<div   id="resulttable" style="overflow-y:auto; height:100%!important; padding-top:10px;padding-left:22px;margin-bottom: 20px;">
							</div>
						</div>
						 
					 	<div  data-ibiz-layout="region:'south',height:'30'" style="border-left:1px solid #ddd ;border-bottom:1px solid #ddd ;border-right:1px solid #ddd ;padding-left: 22px;padding-top: 5px;" >
							<a href="#" id="first" style="font-size:15px" onclick="exportData(document.getElementById('checked').value,1)">&lt;&lt;首页&nbsp;</a>
							<a href="#" id="last" style="font-size:15px"onclick="exportData(document.getElementById('checked').value,currentPage-1)">&lt;上一页&nbsp;</a>
							<span id='curPageNum' style="font-size:15px"></span>
							<a href="#" id="next" style="font-size:15px" onclick="exportData(document.getElementById('checked').value,currentPage+1)">&nbsp;下一页&gt;</a>
							<a href="#" id="finally" style="font-size:15px" onclick="exportData(document.getElementById('checked').value,numberpage)">&nbsp;最后一页&gt;&gt;</a>
						</div>
					</div>
					
<script>
var controller = null;
function getController()
{
   return controller;
}
jQuery(document).ready(function(){
        controller = new GG_CARDFullSearchViewController({appctx:'${ctx2}',webctx:'${web}',autoLayout:true});
	controller.init({parentMode:<%=p.getParentMode()%>,parentData:<%=p.getParentData()%>});
	
	
});
document.onkeydown=function(e){
	var theEvent=window.event||e;
	var code=theEvent.keyCode||theEvent.which;
	if(code==13){
		$("#btn1").click();
	}
}
var contion="";
var win="";
var Json="";
var HcurrentPage=1;
var Hnumberpage=1;
var Htotalhits=0;
var currentPage=1;
var numberpage=1;
var totalhits=0;
var mulu='';
var tags='';
var ids="";

function search()
{
	var keyword=document.getElementById('checked').value;
	currentPage=1;
    exportData(keyword, currentPage);
}

function exportData(arg,gopage) {
	var me = this;
	
	if(arg=='')
		return;
	if (gopage>numberpage)
	{
		return;
	}
	if (gopage<1)
	{
		return;
	} 
 
	var kw=document.getElementById('checked').value;
	
	var params = {srfaction: 'fs',  "kw":kw,"nowpage":gopage};
	
	 
	controller.loadingTag=IBiz.beginload();
		IBiz.ajax({
			url: controller.getBackendUrl(),
			params: params,
			method: 'POST',
			dataType: 'json',
			success: function(data) {
				IBiz.endload(controller.loadingTag);
				var flag=false;
				JsSuccessHandle(data);
			},
			failure: function(e) {
				IBiz.alert('','查询数据失败,请求异常',2);
			}
		});
	}

function JsSuccessHandle(data){
	var data1=data.result;
	var html2="";
	for( var i=0;i<data1.length;i++){
		var type=data1[i].type;
		var title=data1[i].title;
		var key=data1[i].key;
		var tag=data1[i].tag;
		var desc=data1[i].desc;
		var updatedate=data1[i].updatedate;
		html2=html2+"<label> <h><b><a href='#' onclick='ActionView(  \"详细信息\" ,\"gg_cardpreview.jsp?srfkey="+key +"\")'>"+title+"</b></a></h><br>"+"<h>"+"更新时间:<h>"+updatedate+"</h><br>"+"<h>"+desc+"</h><br><br>";
	}
	document.getElementById("resulttable").innerHTML=html2;
	 
		currentPage=data.page;
		numberpage=data.numberpage;
		totalhits=data.totalhits
		document.getElementById("curPageNum").innerHTML="  共命中"+totalhits+"条数据，当前为第"+currentPage+"页/共"+numberpage+"页   ";
	 
} 
function ActionView(title ,url)
{
	 
	/*win = $.ibizapp.createWindow({});
	 
	win.title = title;
	win.height =  0;
	win.width =   0;
	win.url =url;
	win.viewparam = {};
	var  modal = true;
	 
	if(modal){
		win.openModal(window);
	}*/
	window.open(url);
}
function exportData2() {
	var params = {srfaction: 'mk'};
	 
	if (IBizApp_Data) {
		params.srfappdata = IBizApp_Data;
	}
	controller.loadingTag=IBiz.beginload();
	IBiz.ajax({
		url: controller.getBackendUrl(),
		params: params,
		method: 'POST',
		dataType: 'json',
		success: function(data) {
			IBiz.endload(controller.loadingTag);
			var s=data.stadus;
	},
		failure: function(e) {
		IBiz.alert('','导出数据失败,请求异常2',2);
	}
});
}
 
</script>
</body>
</html>
 